﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title></title>
    <!-- Bootstrap -->
    <link rel="stylesheet" type="text/css" href="/ViewV5/CSS/bootstrap3.3.5/css/bootstrap.css">
    <link href="/ViewV5/CSS/BootOver.css?v=1" rel="stylesheet" />
    <link rel="stylesheet" href="/ViewV5/CSS/icfont_qj/iconfont.css">
    <link href="/ViewV5/JS/chosen/chosen.css" rel="stylesheet" />

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script src="/ViewV5/JS/jquery-1.11.2.min.js"></script>
    <script src="/ViewV5/JS/jquery-migrate-1.1.0.min.js"></script>
    <script src="/ViewV5/JS/layer/layer.js"></script>
    <script src="/ViewV5/JS/avalon1.5.js"></script>
    <script src="/ViewV5/CSS/bootstrap3.3.5/js/bootstrap.js"></script>
    <script src="/ViewV5/JS/SZHLCommon.js?jsver=20160925"></script>
    <script src="/ViewV5/JS/ADDJS.js?ver=20170327"></script>
    <script src="/ViewV5/JS/chosen/chosen.jquery.min.js"></script>

    <style>
        #tab.table > thead > tr > th, #tab.table > tbody > tr > th, #tab.table > tfoot > tr > th, #tab.table > thead > tr > td, #tab.table > tbody > tr > td, #tab.table > tfoot > tr > td {
            vertical-align: middle;
            text-align: center;
        }

        .default-tab input, .default-tab select {
            border: none;
            box-shadow: none !important;
        }

        a .iconfont {
            margin-right: 5px;
            font-size: 12px;
        }
    </style>
</head>
<body>
    <div class="form-horizontal" ms-controller="ZXMX">
        <h3 style="text-align: center">{{MXData.dwname}}--{{JHData.JHTitle}}交单</h3>

        <div style="margin: 20px;">
            <div class="default-tab ft14">
                <table class="table table-hover table-bordered">

                    <tbody>
                        <tr>
                            <td class="text-right">项目期别</td>
                            <td>{{MXData.Remark1}}-{{MXData.Remark2}}</td>
                            <td class="text-right">计划科目</td>
                            <td>{{MXData.FLName}}</td>
                            <td class="text-right">当月计划(元)</td>
                            <td>{{MXData.je1}}</td>


                        </tr>
                        <tr>
                            <td class="text-right">合同编号</td>
                            <td>{{MXData.htbh}}</td>
                            <td class="text-right">合同名称</td>
                            <td>{{MXData.htnr}}</td>

                            <td class="text-right">对方单位</td>
                            <td>{{MXData.dfdw}}</td>
                        </tr>
                        <tr>
                            <td style="width: 120px; text-align: right">计划描述</td>
                            <td colspan="5">{{MXData.je1dec}}</td>

                        </tr>
                    </tbody>

                </table>
            </div>


            <div class=" tab ft14 ">
                <div class="form-horizontal" style="margin: 20px  auto auto 50px;">
                    <div class="form-group">
                        <label for="companyName" class=" col-xs-2 control-label text-right">交单金额（元）</label>
                        <div class="col-xs-6">
                            <input type="text" class="form-control" id="jdje" placeholder="请输入交单金额" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="companyName" class=" col-xs-2 control-label text-right">收款单位</label>
                        <div class="col-xs-6">
                            <div class="add-ic">
                                <div class="input-group ">
                                    <input type="text" class="form-control" placeholder="收款单位" autocomplete="off" id="skdw">
                                    <span class="input-group-addon" style="height: 34px; color: #FFF; background-color: #12B8F6; border: none; border-radius: 0px; cursor: pointer;" ms-click="selSKDW()">选择单位</span>
                                </div>

                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="Address" class="col-xs-2 control-label text-right">收款开户行</label>
                        <div class="col-xs-6">
                            <input type="text" class="form-control" id="khh" placeholder="收款开户行" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="companyName" class=" col-xs-2 control-label text-right">收款开户联行号</label>
                        <div class="col-xs-6">
                            <input type="text" class="form-control" id="khlhh" placeholder="请输入收款开户联行号" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="companyName" class=" col-xs-2 control-label text-right">收款账号</label>
                        <div class="col-xs-6">
                            <input type="text" class="form-control" id="skzh" placeholder="请输入收款账号" />
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="companyName" class=" col-xs-2 control-label text-right"></label>
                        <div class="col-xs-6">
                            <button class="btn btn-success btnSucc" style="width: 120px;" ms-click="ZCJD()">确认交单</button>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>

    <script>
        var tempmodel = avalon.define({
            $id: "ZXMX",
            name: "执行明细",
            jhid: ComFunJS.getQueryString("JHID", "0"),
            mxid: ComFunJS.getQueryString("MXID", "0"),
            JHData: {},
            MXData: {},
            selSKDW: function () {
                top.ComFunJS.winbtnwin("/ViewV5/AppPage/JHZD/DFDWSELLIST.html", "选择收款单位", 800, 470, {}, function (layero, index) {
                    var frameid = $("iframe", $(layero)).attr('id');
                    var htjddata = ComFunJS.isIE() ? top.window.frames[frameid].model.getseldata() : top.$("#" + frameid)[0].contentWindow.model.getseldata();
                    $("#khh").val(htjddata[0].skkhh)
                    $("#khlhh").val(htjddata[0].khhlhh)
                    $("#skdw").val(htjddata[0].SKDW)
                    $("#skzh").val(htjddata[0].skzh)

                    top.layer.close(index)

                })
            },
            ZCJD: function () {
                if (!$("#jdje").val() || !$("#khh").val() || !$("#khlhh").val() || !$("#skdw").val() || !$("#skzh").val()) {
                    alert('请输入全部数据')
                    return;
                }
                $.getJSON("/API/VIEWAPI.ashx?Action=ZCZX_ZCJD", { P1: tempmodel.mxid, jdje: $("#jdje").val(), khh: $("#khh").val(), lhh: $("#khlhh").val(), skdw: $("#skdw").val(), skzh: $("#skzh").val() }, function (resultData) {
                    if (resultData.ErrorMsg == "") {
                        ComFunJS.winsuccess("操作成功");
                    }
                })
            }
        });
        avalon.ready(function () {
            $.getJSON('/API/VIEWAPI.ashx?Action=ZCZX_GETZXINITDATA', { P1: tempmodel.jhid, P2: tempmodel.mxid }, function (resultData) {
                if (resultData.ErrorMsg == "") {
                    tempmodel.JHData = resultData.Result;
                    tempmodel.MXData = resultData.Result1;
                    setTimeout("ComFunJS.initForm()", 500)
                }
            })

        })
        tempmodel.$watch("ZXData.length", function (a) {
            tempmodel.zje = 0;
            tempmodel.ZXData.forEach(function (item) {
                tempmodel.zje = tempmodel.zje + item.jsje * 1;
            })
        })
    </script>
</body>
</html>
